﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cow
{
    public static class TypeHelper
    {
        public static String GetStandardType(String type, bool isNull)
        {
            String standardType = type;
            //switch (type.ToLower())
            //{
            //    case "string":
            //        standardType = "String";
            //        break;
            //    case "int":
            //        standardType = "Int32";
            //        break;
            //    case "bool":
            //        standardType = "Boolean";
            //        break;
            //    case "decimal":
            //        standardType = "Decimal";
            //        break;
            //}
            if (isNull && 
                !standardType.Equals("string") && 
                !standardType.Equals("byte[]"))
            {
                standardType += "?";
            }
            return standardType;
        }
    }
}
